<style>
    #formBasForm {
        max-width: 700px;
        margin: 30px auto;
    }

    #formBasForm .layui-form-item {
        margin-bottom: 25px;
    }
</style>
<!-- 正文开始 -->
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <!-- 表单开始 -->
            <form class="layui-form" id="formBasForm" lay-filter="formBasForm">
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">标题:</label>
                    <div class="layui-input-block">
                        <input name="title" placeholder="给目标起个名字" class="layui-input"
                               lay-verType="message" lay-verify="required" required/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">起止日期:</label>
                    <div class="layui-input-block">
                        <input id="formBasDateSel" name="date" placeholder="请选择开始和结束日期" class="layui-input icon-date"
                               autocomplete="off" lay-verType="message" lay-verify="required" required/>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label layui-form-required">目标描述:</label>
                    <div class="layui-input-block">
                        <textarea name="desc" placeholder="请输入你的阶段性工作目标" class="layui-textarea"
                                  lay-verType="message" lay-verify="required" required></textarea>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label layui-form-required">衡量标准:</label>
                    <div class="layui-input-block">
                        <textarea name="hlbz" placeholder="请输入衡量标准" class="layui-textarea"
                                  lay-verType="message" lay-verify="required" required></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label icon-text">
                        客户 <i class="layui-icon layui-icon-tips" lay-tips="目标的服务对象"
                              lay-direction="1" lay-offset="0,-10px"></i> :
                    </label>
                    <div class="layui-input-block">
                        <input name="customer" placeholder="请描述你服务的客户" class="layui-input"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">邀评人:</label>
                    <div class="layui-input-block">
                        <input name="person" placeholder="最多可邀请5人" class="layui-input"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">权重:</label>
                    <div class="layui-input-block">
                        <input type="number" name="qz" placeholder="请输入" class="layui-input inline-block"
                               style="width: 160px;"/>
                        <span>&nbsp;&nbsp;%</span>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">目标公开:</label>
                    <div class="layui-input-block">
                        <input type="radio" name="gk" value="0" title="公开" checked>
                        <input type="radio" name="gk" value="1" title="部分公开">
                        <input type="radio" name="gk" value="2" title="不公开">
                        <div class="layui-word-aux">客户、邀评人默认被分享</div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-filter="formBasSubmit" lay-submit>&emsp;提交&emsp;</button>
                        <button type="reset" class="layui-btn layui-btn-primary">&emsp;重置&emsp;</button>
                    </div>
                </div>
            </form>
            <!-- //表单结束 -->
        </div>
    </div>
</div>

<!-- js部分 -->
<script>
    layui.use(['layer', 'form', 'laydate'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var laydate = layui.laydate;
        form.render('radio', 'formBasForm');

        /* 渲染laydate */
        laydate.render({
            elem: '#formBasDateSel',
            trigger: 'click',
            range: true
        });

        /* 监听表单提交 */
        form.on('submit(formBasSubmit)', function (data) {
            layer.msg(JSON.stringify(data.field));
            return false;
        });

    });
</script>